package LeetCode.LeetCodeHot;

/**
 * 爬楼梯
 * @author lumin
 * @date 2022/05/07 15:39
 **/
public class Num70 {
    public int climbStairs(int n) {
        int p = 0, q = 0, r = 1;
        for (int i = 1; i <= n; ++i) {
            p = q;
            q = r;
            r = p + q;
        }
        return r;
    }
}